<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表格</title>
    <style>
        table{
            /*设置表格间距，表格内边距*/
            border-collapse: collapse;
            width: 500px;
        }
        /*组合选择器*/
        table,th,td{
            border:1px solid blueviolet;
        }
        th{
            height: 50px; 
            background-color: bisque;
        }
        td{
            height: 50px;
            text-align: center;
            /*垂直居中*/
            vertical-align: middle;
        }
    </style>
</head>
<body>
    <table>
        <thead>
            <tr>
                <th>id </th>
                <th>用户名</th>
                <th>年龄</th>
                <th>性别</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>1</td>
                <td>tom</td>
                <td>12</td>
                <td>male</td>
            </tr>
              <tr>
                <td>2</td>
                <td>mack</td>
                <td>15</td>
                <td>female</td>
            </tr>
        </tbody>
    </table>
</body>
</html>